package com.baoer.mapper;

import com.baoer.dto.resp.GetstoreInfoRespDTO;
import com.baoer.dto.resp.OperatorRespDTO;
import com.baoer.dto.resp.SaleRespDTO;
import com.baoer.dto.resp.UserRespDTO;
import com.baoer.entity.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author: YING
 * @CreateTime: 2025-06-25
 * @Description:
 * @Version: 1.0
 */
@Mapper
public interface UserMapper  {
   //  List<UserRespDTO> list = userMapper.getUserInfoPage(phone, pageIndex,pageSize);
   List<UserRespDTO> getUserInfoPage(@Param("phone")String phone, @Param("pageIndex") Integer pageIndex, @Param("pageSize") Integer pageSize,@Param("username")String username,@Param("shopname")String shopname);

   double UserPageCount();

   void updateUserInfo(@Param("id") Integer id,@Param("shopname") String shopname, @Param("userid")Integer userid,@Param("phone") String phone,@Param("username")String username);

   void delUserInfo(@Param("id") Integer id);

   void addUserInfo(@Param("storeid") Integer storeid,@Param("phone") String phone,@Param("userid") Integer userid,@Param("username") String username,@Param("id") Integer id);

   double SalePageCount();

   List<SaleRespDTO> getSaleInfoPage(Integer pageIndex, Integer pageSize, String username, String shopname);

   double OperatorPageCount();

   List<OperatorRespDTO> getOperatorInfoPage(@Param("phone")String phone, @Param("pageIndex") Integer pageIndex, @Param("pageSize") Integer pageSize,@Param("username")String username,@Param("shopname")String shopname);

   void addOperatorInfo(Integer storeid, String avatar, String phone, Integer userid, String username);

   List<GetstoreInfoRespDTO> getstoreInfo();

   List<GetstoreInfoRespDTO> getheadstoreInfo();
}
